#!/home/fuzz/miniforge3/bin/python

from damai_server import Solutions
import sys

if __name__ == "__main__":
    # argslen > 1
    if len(sys.argv) > 1:
        if sys.argv[1] == "print":
            Solutions().print_all_servers()
        if sys.argv[1] == "refresh":
            Solutions().refresh()
        if sys.argv[1] == "refresh_disk":
            Solutions().refresh_disk()
        if sys.argv[1] == "search":
            Solutions().search()
        if sys.argv[1] == "cmd":
            Solutions().cmd(sys.argv[2], sys.argv[3])
        if sys.argv[1] == "expired_in_days_count":
            print(Solutions().server_count_expired_in_days(int(sys.argv[2])))
        if sys.argv[1] == "e":
            print(Solutions().server_expired_in_days(int(sys.argv[2])))
        if sys.argv[1] == "ed":
            print(Solutions().disks_expired_in_days(int(sys.argv[2])))
        if sys.argv[1] == "innet":
            Solutions().innet(sys.argv[2])

    elif len(sys.argv) == 1:
        Solutions().search()
